package yieldCurve;

public class FRA extends Instrument {
	int fromMonth;
	int toMonth;
	
	/** Constructor for FRA instrument type
	 * 
	 * @param subType subtype of instrument
	 * @param marketRate rate of given subtype
	 */
	public FRA(String subType, double marketRate) {
		super(subType, marketRate);

		int xPos = subType.indexOf("x");
		fromMonth = Integer.parseInt(subType.substring(0, xPos));
		toMonth = Integer.parseInt(subType.substring(xPos + 1));
	}
	
	public int getFromMonth() {
		return fromMonth;
	}
	
	public int getToMonth() {
		return toMonth;
	}
}